package map.model;

import java.util.Objects;

public class Person {
	private String name;
	private float height;
	private int age;
	
	
	
	public Person(String name, float height, int age) {
		this.name = name;
		this.height = height;
		this.age = age;
	}

	@Override
	public int hashCode() {
		int hashCode = name == null ? 0 : name.hashCode();
		hashCode = hashCode * 31 + Float.hashCode(height);
		hashCode = hashCode * 31 + Integer.hashCode(age);
		return hashCode;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj) return true;
		if (obj == null || this.getClass() != obj.getClass()) return false;
		Person p = (Person)obj;
		return Objects.equals(this.name, p.name)
				&& Objects.equals(this.height, p.height)
				&& Objects.equals(this.age, p.age);
	}
}
